package com.feeyo.groundservice.checkin.activity

import android.os.Bundle
import androidx.fragment.app.Fragment
import com.blankj.utilcode.util.BarUtils
import com.feeyo.groundservice.base_util.FyLog
import com.feeyo.groundservice.base_util.getColor
import com.feeyo.groundservice.base_util.getRouterPath
import com.feeyo.groundservice.checkin.R
import com.feeyo.groundservice.checkin.constant.CheckInPath
import com.feeyo.groundservice.checkin.constant.TOKEN
import com.feeyo.groundservice.checkin.constant.UID
import com.feeyo.groundservice.checkin.constant.statusBarColor
import com.therouter.router.Route

/**
 *作者：70893 on 2025-04-28
 *描述：加载fragment
 */
@Route(path = CheckInPath.CheckInActivity, description = "加载fragment")
internal class LoadCheckInToActivity : BaseCheckInActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setStatusBarColor(statusBarColor.getColor(), false)
        setContentView(R.layout.activity_load_fragment)
        initView()
    }

    private fun initView() {

       CheckInPath.CheckInFragment.getRouterPath()
           .withString(UID, "10")
           .withString(TOKEN, "c3e142cd-d2f0-4679-b958-70d2c9afc2de")
           .withInt("topPadding",BarUtils.getStatusBarHeight())
           .createFragment<Fragment>()?.let {
            supportFragmentManager.beginTransaction()
                .replace(R.id.fragment_task_container, it)
                .commitNow()
        }?:kotlin.run {
           FyLog.e("LoadCheckInToActivity", "null")
        }

    }
}